package com.hilon.segment.mybatis.utils;


import javax.persistence.EntityManager;
import javax.persistence.EntityManagerFactory;
import javax.persistence.Persistence;

public class ProJPAUtil {
    public static EntityManagerFactory factory;

    static {
        factory = Persistence.createEntityManagerFactory("segmentConnection");//这里的product需要和命名空间相同
    }

    public static EntityManager getEntityManager() {
        return factory.createEntityManager();
    }
}